package com.k136.service.impl;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.k136.entity.Person;
import com.k136.mapper.PersonMapper;
import com.k136.service.PersonService;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;
import java.util.List;

/**
 * TODO 类
 *
 * @author LiuTai
 * @version 1.00
 * @Date 2024/9/24
 */
@Service
public class PersonServiceImpl implements PersonService {
    @Resource
    private PersonMapper personMapper;
    @Override
    public List<Person> selAllPerson() {
        List<Person> people = personMapper.selectAllPerson();
        return people;
    }

    @Override
    public PageInfo<Person> pageAllPerson(Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<Person> people = personMapper.selectAllPerson();
        PageInfo<Person> pageInfo=new PageInfo<>(people);
        return pageInfo;
    }
}
